package com.yangff.api.client.fallback;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yangff.api.client.ProductClient;
import com.yangff.entity.product.entity.dto.FundnetvalueDTO;
import com.yangff.entity.product.entity.dto.ProductCommentsDTO;
import com.yangff.entity.product.entity.vo.FundnetvalueVo;
import com.yangff.entity.product.entity.vo.ProductCommentsVo;
import com.yangff.entity.product.entity.vo.ProductVo;
import com.yangff.entity.vo.ResultVo;
import com.yangff.entity.product.entity.Financialproduct;
import com.yangff.entity.product.entity.dto.AutoStockDTO;
import com.yangff.entity.product.entity.dto.FinancialproductDTO;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.data.domain.Pageable;

import java.util.List;

public class ProductClientFallbackFactory implements FallbackFactory {
    @Override
    public ProductClient create(Throwable cause) {
        return new ProductClient() {

            @Override
            public ProductVo saveProduct(Financialproduct financialproduct) {
                return null;
            }

            @Override
            public Page<ProductVo> selectProduct(Pageable pageable) {
                return null;
            }

            @Override
            public ProductVo getProductByCode(String code) {
                return new ProductVo();
            }

            @Override
            public ResultVo deleteProductByCode(String code) {
                return ResultVo.error();
            }

            @Override
            public ProductVo updateProduct(FinancialproductDTO financialproductDTO) {
                return null;
            }

            @Override
            public ProductVo saveTypeProduct(AutoStockDTO stockDTO) {
                return null;
            }

            @Override
            public List<FundnetvalueVo> getFundNetValueByCode(String code) {
                return null;
            }

            @Override
            public ProductVo saveFundNetValue(FundnetvalueDTO fundnetvalueDTO) {
                return null;
            }


            @Override
            public ResultVo deleteFundNetValueByCode(String code) {
                return ResultVo.error();
            }

            @Override
            public ResultVo updateAllFundNetValue(ResultVo empty) {
                return ResultVo.error();
            }

            @Override
            public List<ProductCommentsVo> getProductCommentsByCode(String code) {
                return null;
            }

            @Override
            public List<ProductCommentsVo> getProductCommentsByAccount(String account) {
                return null;
            }

            @Override
            public ResultVo addProductComments(ProductCommentsDTO productCommentsDTO) {
                return ResultVo.error();
            }

        };

    }
}
